import 'package:flutter/material.dart';
import 'package:draw_window/basic.dart';

class StandardFrame extends RegisterWidget{

  var paddingAll = 8.0;

  @override
  String get type {
    return "standard-frame";
  }

  @override
  RegisterWidget get clone {
    return StandardFrame();
  }

  @override
  void insert(Offset offset, Node parent) {
    if(parent.availableWidth > paddingAll * 2 && parent.availableHeight > paddingAll * 2){
      var t1 = Node(type: type,padding: Distance.all(paddingAll));
      parent.children.add([t1,]);
      t1.children.add([Node(type: "container",),]);
    }
  }

  @override
  void update(Vary vary, double value) {

  }
}

